#ifndef DVSTYLEDITEMDELEGATE_H
#define DVSTYLEDITEMDELEGATE_H

#include <QStyledItemDelegate>
#include "dvDatabaseControllerUsable.h"

class dvStyledItemDelegate : public QStyledItemDelegate, public dvDatabaseControllerUsable
{
    Q_OBJECT
public:
    explicit dvStyledItemDelegate(QObject *parent = 0);

    void setCurrentMap(int id){m_map = id;}

    QWidget *createEditor(QWidget *parent,
                          const QStyleOptionViewItem &option,
                          const QModelIndex &index) const;
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
    void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;

private:
    int m_map;
    
signals:
    
public slots:
    
};

#endif // DVSTYLEDITEMDELEGATE_H
